1. Field of the Invention
The present invention generally relates to image processing devices such as copiers, FAX machines, printers, etc., for processing image signals, and particularly relates to an image processing device which attends to gray-scale conversion such as gamma correction.
2. Description of the Related Art
An image processing device such as a copier machine scans a document sheet placed on the contact glass, and performs opto-electrical conversion on each scanned line. The obtained image signal is converted into a digital signal, which is then subjected to image processing to generate a recording signal. The image processing device uses this recording signal to modulate laser light emitted form a laser device, thereby forming a latent image on a photo-sensitive body. This latent image corresponds to the original document image.
The image processing performed during the above operation includes such processes as color correction, gamma correction, shading correction, MTF correction, gray-scale correction, size enlargement/reduction process, etc.
Conventional image-processing devices conduct gamma correction by using a look-up table stored in a memory. Namely, a look-up table, which lists output levels corresponding to input levels over the entire gray-scale range, is stored in an external memory, and an input address representing an input level is supplied to read a corresponding output level from the memory. An input-to-output relation between the input levels and the output levels can be drawn as a characteristic curve on a graph, which is generally referred to as a gamma curve.
The memory may need to store more than one look-up table, i.e., more than one relations between input levels and the output levels. Such a plurality of gamma curves may become necessary when the copier machine is provided with a function to select a desired image density from a plurality of image density levels for printing images, for example. This adds to memory space required for storing the look-up tables.
In some configurations where an image memory is shared by different devices, separate gamma corrections may become necessary for the scanner and for the printer, for example. This also adds to the memory space for the look-up tables. Also, when there is a need to change gamma curves, all the entries in the look-up tables have to be rewritten.
In this manner, the scheme which stores gamma curves as look-up tables requires a relatively large memory space, and lacks flexibility in changing gamma curves
Accordingly, there is a need for an image processing device which can reduce a data size required for gamma correction, and allows the gamma curves to be easily modified.
In image processing, generally, an SIMD (single instruction and multiple data) processor can save a lot of computation time by providing pixel-wise parallel operations. It is quite natural to expect that the SIMD processor would be quite effective in gray-scale conversion such as gamma correction since the gray-scale conversion is a pixel-wise parallel process in nature. Only a simple operation, however, can be performed by each processing element of the SIMD processor, and an algorithm for the SIMD processor to calculate gray-scale conversion has yet to be developed.
Accordingly, there is a need for an image processing device which uses an SIMD processor to perform gray-scale conversion.
Accordingly, it is a general object of the present invention to provide an image processing device which can satisfy the need described above.
It is another and more specific object of the present invention to provide an image processing device which can reduce the data size necessary for gamma correction, and allows the gamma curves to be easily modified.
It is another and more specific object of the present invention to provide an image processing device which uses an SIMD processor to perform gray-scale conversion.
In order to achieve the above objects, an image processing device for performing gray-scale conversion includes a plurality of processing elements which include respective registers and perform the gray-scale conversion in parallel with respect to respective pixels based on data stored in the respective registers, and further includes a control unit which controls the processing elements such that the registers of a given one of the processing elements store data of a line segment which is selected from a series of line segments representing an input-to-output relation of the gray-scale conversion, the line segment being selected to correspond to an input gray-scale level of a corresponding pixel.
The image processing device described above uses data of the series of line segments to represent the input-to-output relation of the gray-scale conversion, thereby reducing the data size necessary for the gray-scale conversion such as gamma correction in comparison to when a look-up table is used. Also, a gamma curve can be easily modified by changing the data of the series line segments. Further, a line segment pertinent to a given pixel is selected, and a corresponding processing element operates based on the data of the pertinent line segment. This configuration allows the processing elements to operate in parallel in accordance with the same instructions while attending to calculation directed to different line segments.
According to another aspect of the present invention, the image processing device described above further includes a program memory unit which stores programs for causing the control unit to control the processing elements.
According to another aspect of the present invention, the image processing device described above further includes a memory unit which stores data of the series of line segments representing the input-to-output relation of the gray-scale conversion, wherein the control unit transfers the data of the line segment to the registers of the given one of the processing elements.
According to another aspect of the present invention, the image processing device described above is such that the data of the series of line segments includes a position of a start point of each of the line segments and a slope of each of the line segments, and each of the processing elements includes an operation unit which performs an operation specified by the control unit and a flag which stores a value indicative of a result of the operation, wherein the control unit controls the operation unit to make a comparison between the position of the start point and the input gray-scale level of a corresponding pixel successively with respect to each of the line segments so that the flag indicates whether a line segment is already selected for a corresponding one of the processing elements.
According to another aspect of the present invention, the image processing device described above is such that the gray-scale conversion comprises gamma correction, and the series of line segments represent a gamma curve of the gamma correction.
According to another aspect of the present invention, the image processing device described above further includes a scanning unit which scans a document image, and produces a scanned image signal, and an image-formation unit which prints the document image on a sheet of paper in accordance with a processed image signal, which is obtained by applying the gray-scale conversion to the scanned image signal.
According to another aspect of the present invention, a method of performing gray-scale conversion by controlling a plurality of processing elements operating in parallel with respect to respective pixels includes the steps of a) representing an input-to-output relation of the gray-scale conversion by a series of line segments, b) selecting a line segment from the series of line segments with respect to each of the processing elements so that the line segment selected for a given one of the line segments corresponds to an input gray-scale level of a corresponding pixel, and c) controlling the processing elements in parallel to perform the gray-scale conversion, each of the processing elements operating based on data of the selected line segment.
The method described above uses data of the series of line segments to represent the input-to-output relation of the gray-scale conversion, thereby reducing the data size necessary for the gray-scale conversion such as gamma correction in comparison to when a look-up table is used. Also, a gamma curve can be easily modified by changing the data of the series line segments. Further, a line segment pertinent to a given pixel is selected, and a corresponding processing element operates based on the data of the pertinent line segment. This configuration allows the processing elements to operate in parallel in accordance with the same instructions while attending to calculation directed to different line segments.
According to another aspect of the present invention, the method described above is such that the step a) includes a step of storing data of each of the line segments in a memory unit, and the step b) includes a step of storing the data of the selected line segment in registers of a respective one of the processing elements.
According to another aspect of the present invention, the method described above is such that the step a) includes a step of storing data of each of the line segments in a memory unit, the data including a position of a start point and a slope of each of the line segments, and the step b) include the steps of successively selecting one of the line segments in an order of the series, making a comparison between the position of a start point of the successively selected one of the line segments and an input gray-scale level of a pixel of a given processing element, and storing the data of the successively selected one of the line segments in registers of the given processing element unless the comparison indicates that the data of the line segment corresponding to the input gray-scale level of the pixel of the given processing element has been stored in the registers of the given processing element.
According to another aspect of the present invention, the method described above is such that the gray-scale conversion comprises gamma correction, and the series of line segments represent a gamma curve of the gamma correction.
According to another aspect of the present invention, the method described above further includes the steps of scanning a document image to produce a scanned image signal, and printing the document image on a sheet of paper in accordance with a processed image signal, which is obtained by applying the gray-scale conversion to the scanned image signal.
Other objects and further features of the present invention will be apparent from the following detailed description when read in conjunction with the accompanying drawings.